Imaging device and focus control method having first and second correlation computations

ABSTRACT

Provides an imaging device including, imaging element in which plural first lines arrayed with first phase difference detection pixels, and plural second lines arrayed with second phase difference detection pixels, are arrayed alternately; reading out section read out signals of the phase difference detection pixels; first correlation computing section carry out first correlation computation on signals read out from a set of the first and the second phase difference detection pixel; second correlation computing section carry out second correlation computation on signals read out from at least one set among a set of plural first phase difference detection pixels of the first line, and a set of plural second phase difference detection pixels of the second line; correcting section corrects results of the first correlation computation, by results of the second correlation computation; and focusing section control focusing based on the corrected correlation computation.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of copending application Ser. No.13/974,928, filed on Aug. 23, 2013, which is a Continuation of PCTInternational Application No. PCT/JP2012/056024, filed on Mar. 8, 2012,which claims priority from Japanese Patent Application No. 2011-080033,filed on Mar. 31, 2011, all of which are hereby expressly incorporatedby reference into the present application.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an imaging device and a focus controlmethod thereof In particular, the present invention relates to animaging device and a focus control method thereof that carry out focuscontrol at the time of imaging an imaged subject.

2. Description of the Related Art

In recent years, accompanying the increasing of the resolutions ofsolid-state imaging elements such as CCD (Charge Coupled Device) areasensors, CMOS (Complementary Metal Oxide Semiconductor) image sensorsand the like, the demand for information devices having an imagingfunction, such as digital electronic still cameras, digital videocameras, cell phones, PDAs (Personal Digital Assistants, portableinformation terminals) and the like, has increased rapidly. Note thatinformation devices having an imaging function such as described aboveare called imaging devices.

By the way, focus control methods that detect the distance to a mainimaged subject include the contrast method and the phase difference AF(Auto Focus, automatic focus) method. The phase difference AF method maycarry out detection of the focus position at high speed and with highaccuracy, as compared with the contrast method, and therefore, is oftenemployed in various imaging devices.

Note that it is known that the method of reading out in an imagingdevice that uses a CMOS is the rolling shutter method that carries outsuccessive resetting and successive reading out from the top. In therolling shutter method, because there is a time difference in thereading out timing in accordance with the pixel position, distortionarises in the image of the imaged subject in cases of an imaged subjectthat moves.

Accordingly, when imaging an imaged subject that moves by an imagingdevice that uses a CMOS, when it is made to carry out focus control bythe phase difference AF method, the focus control is affected by thedistortion due to the rolling shutter, and errors in phase differencedetection arise due to image movement or image variations that ariseduring the lag in the read out timings.

Japanese Patent Application Laid-Open No. 2009-128579 discloses a devicethat, when reliable focal point detection results are not obtained atfocal point detection pixels that are disposed in the horizontaldirection, carries out focal point detection at focal point detectionpixels that are disposed in the vertical direction, and, when movementof the imaged subject is detected, does not carry out focal pointdetection at focal point detection pixels that are disposed in thevertical direction.

Further, Japanese Patent Application Laid-Open No. 2008-72470 andJapanese Patent Application Laid-Open No. 2008-263352 disclose devicesthat controls such that charge accumulating timings of pixels for phasedifference detection become the same.

However, in the technique disclosed in aforementioned ApplicationLaid-Open No. 2009-128579, merely focal point detection by the phasedifference AF method is carried out only under limited conditions, suchas in accordance with the reliability of the focal point detectionresults or in a case in which movement of the imaged subject is notdetected or the like, and, when focal point detection is carried out bythe phase difference AF method, effects due to the rolling shuttercannot be reduced. Further, in the techniques disclosed in JapanesePatent Application Laid-Open No. 2008-72470 and Japanese PatentApplication Laid-Open No. 2008-263352, costs are high because additionalcircuits are required.

The present invention provides an imaging device and a focus controlmethod thereof that, even when carrying out detection of the focusposition from signals read out from phase difference detection pixelsthat are disposed on different lines by the rolling shutter method, mayreduce effects of distortion due to the rolling shutter while detectingthe focus position, and may carry out focus control highly accurately,without providing additional circuits.

SUMMARY OF THE INVENTION

A first aspect of the present invention is an imaging device including:an imaging element in which a plurality of first lines, at which arearrayed first phase difference detection pixels on which is incident alight beam that has passed through one side with respect to a main axisof an imaging lens, and a plurality of second lines, at which arearrayed second phase difference detection pixels on which is incident alight beam that has passed through another side with respect to the mainaxis of the imaging lens, are arrayed alternately; a reading out sectionthat reads out, from the imaging element and by a rolling shuttermethod, signals of phase difference detection pixels that are arrayed atthe imaging element; a first correlation computing section that carriesout correlation computation on signals that are read out from a setformed from the first phase difference detection pixels and the secondphase difference detection pixels; a second correlation computingsection that carries out correlation computation on signals that areread out from at least one set of a set formed from a plurality of firstphase difference detection pixels that are disposed on the first line,or a set formed from a plurality of second phase difference detectionpixels that are disposed on the second line; a correcting section thatcorrects results of a correlation computation obtained by the firstcorrelation computing section, using results of a correlationcomputation obtained by the second correlation computing section; and afocusing section that carries out focus control by using the results ofcorrelation computation that have been corrected.

In this way, in the first aspect of the present invention, correlationcomputation of signals read out from at least one set among a set, thatis formed from plural first phase difference detection pixels that aredisposed on the first line, and a set, that is formed from plural secondphase difference detection pixels that are disposed on the second line,i.e., correlation computation of respective signals of a set of phasedifference detection pixels, on which is incident a light beam that haspassed through the same side with respect to the main axis of theimaging lens, is carried out. Due thereto, the first aspect of thepresent invention may determine only the amount of distortion due to therolling shutter. Due thereto, in the first aspect of the presentinvention, the correlation computation results, that are read out from aset formed from a first phase difference detection pixel and a secondphase difference detection pixel, are corrected. Therefore, the effectsof distortion due to the rolling shutter may be reduced while detectingthe focus position, and focus control may be carried out highlyaccurately.

In a second aspect of the present invention, in the first aspect, thesecond correlation computing section may carry out correlationcomputation on a plurality of sets, and the correcting section maycorrect the results of correlation computation obtained by the firstcorrelation computing section, using an average value of results ofcorrelation computation of a plurality of sets obtained by the secondcorrelation computing section.

In a third aspect of the present invention, in the above-describedaspects, in a case in which the second correlation computing sectioncarries out correlation computation on signals read out from a set thatis configured by four or more phase difference detection pixels, thesecond correlation computing section may divide the four or more phasedifference detection pixels into two groups, and carry out correlationcomputation on an addition signal that is obtained by adding detectionsignals of one group, and an addition signal that is obtained by addingdetection signals of another group.

In a fourth aspect of the present invention, in the above-describedaspects, may further include: a comparing section that, in a case inwhich results of correlation computation of each of a plurality of setsis obtained by the second correlation computing section, compares theresults of correlation computation of each of the plurality of sets withone another; and a control section that, in a case in which results ofcorrelation computation that differ by greater than or equal to apredetermined threshold value exist according to the comparing section,controls such that focus control is cancelled, or controls such that,after cancelling of focus control, read out by the reading section iscarried out again and focus control is carried out.

In a fifth aspect of the present invention, in the above-describedaspects, the second correlation computing section may carry outcorrelation computation on signals that are read out from a set of phasedifference detection pixels at which are provided color filters of asame color as a color of color filters that are provided at phasedifference detection pixels of a set formed from the first phasedifference detection pixel and the second phase difference detectionpixel.

In a sixth aspect of the present invention, in the first through thefourth aspects, correlation computation may be carried out on signalsthat are read out from a set that includes a set of phase differencedetection pixels at which are provided color filters of a colordifferent than a color of color filters that are provided at phasedifference detection pixels of a set formed from the first phasedifference detection pixel and the second phase difference detectionpixel.

In accordance with a seventh aspect of the present invention, theabove-described aspect may further include: a determining section thatdetermines whether or not correction by the correcting section is to becarried out, on the basis of at least one of a size of a focal pointregion in which a focal point is adjusted, a number of phase differencedetection pixels from which are read out signals that are used incorrelation computation by the first correlation computing section,movement of an imaged subject within an imaging angle of view, andmovement of an imaged subject within the focal point region, wherein, ina case in which it is determined by the determining section thatcorrection by the correcting section is not to be carried out, thefocusing section may cancel execution of correction by the correctingsection, and may carry out focus control by using results of correlationcomputation of the first correlation computing section before beingcorrected.

An eighth aspect of the present invention is a focus control method thatis carried out at an imaging device having an imaging element in which aplurality of first lines, at which are arrayed first phase differencedetection pixels on which is incident a light beam that has passedthrough one side with respect to a main axis of an imaging lens, and aplurality of second lines, at which are arrayed second phase differencedetection pixels on which is incident a light beam that has passedthrough another side with respect to the main axis of the imaging lens,are arrayed alternately, the method including: reading out, from theimaging element and by a rolling shutter method, signals of phasedifference detection pixels that are arrayed at the imaging element;carrying out first correlation computation on signals that are read outfrom a set formed from the first phase difference detection pixel andthe second phase difference detection pixel; carrying out secondcorrelation computation on signals that are read out from at least oneset of a set formed from a plurality of first phase difference detectionpixels that are disposed on the first line, or a set formed from aplurality of second phase difference detection pixels that are disposedon the second line; correcting results of the first correlationcomputation, using results of the second correlation computation; andcarrying out controlling focus by using the results of correlationcomputation that have been corrected.

In this way, in accordance with the above-described aspect, it ispossible to determine only the amount of distortion due to the rollingshutter by carrying out correlation computation of signals read out fromat least one set among a set, that is formed from plural first phasedifference detection pixels that are disposed on the first line, and aset, that is formed from plural second phase difference detection pixelsthat are disposed on the second line, i.e., correlation computation ofrespective signals of a set of phase difference detection pixels onwhich a light beam, that has passed through the same side with respectto the main axis of the imaging lens, is incident. Due thereto, in theabove-described aspect, the correlation computation results, that areread out from a set formed from a first phase difference detection pixeland a second phase difference detection pixel, are corrected. Therefore,the effects of distortion due to the rolling shutter may be reducedwhile detecting the focus position, and focus control may be carried outhighly accurately.

In accordance with the above-described aspects of the present invention,the effects of distortion due to the rolling shutter may be reducedwhile detecting the focus position, and focus control may be carried outhighly accurately, without providing additional circuits.

BRIEF DESCRIPTION OF DRAWINGS

Detailed explanation follows regarding exemplary embodiments of thepresent invention, with reference to the following drawings.

FIG. 1 is a block diagram showing the configuration of main portions ofthe electrical system of a digital camera relating to exemplaryembodiments of the present invention.

FIG. 2 is a plan view showing the overall configure of a CMOS.

FIG. 3 is an enlarged schematic drawing of a surface of a portion withinan AF region.

FIG. 4 is a drawing schematically showing only phase differencedetection pixels that are used in phase difference detection.

FIG. 5A is a drawing schematically showing that an offset amount, thatis determined from correlation computation of detection signals read outfrom a pair of phase difference detection pixels, includes not only aphase difference amount, but also an error amount due to rollingdistortion (a distortion amount due to the rolling shutter).

FIG. 5B is a drawing schematically showing that the distortion amountdue to the rolling shutter can be computed by carrying out correlationcomputation based on a pair of phase difference detection pixels thatare positioned the same distance from one ends of lines.

FIG. 6 is a flowchart showing the flow of AF control relating to a firstexemplary embodiment.

FIG. 7 is a drawing that shows a concrete example of phase differencedetection pixels used in order to compute the distortion amount due tothe rolling shutter, and that is for explaining a computing method atthe time of computing the distortion amount due to the rolling shutterby using these.

FIG. 8 is a drawing that shows another example of phase differencedetection pixels used in order to compute the distortion amount due tothe rolling shutter, and that is for explaining a computing method atthe time of computing the distortion amount due to the rolling shutterby using these.

FIG. 9 is a drawing that shows another example of phase differencedetection pixels used in order to compute the distortion amount due tothe rolling shutter, and that is for explaining a computing method atthe time of computing the distortion amount due to the rolling shutterby using these.

FIG. 10 is a drawing that shows another example of phase differencedetection pixels used in order to compute the distortion amount due tothe rolling shutter, and that is for explaining a computing method atthe time of computing the distortion amount due to the rolling shutterby using these.

FIG. 11 is a drawing that shows another example of phase differencedetection pixels used in order to compute the distortion amount due tothe rolling shutter, and that is for explaining a computing method atthe time of computing the distortion amount due to the rolling shutterby using these.

FIG. 12 is a drawing that shows another example of phase differencedetection pixels used in order to compute the distortion amount due tothe rolling shutter, and that is for explaining a computing method atthe time of computing the distortion amount due to the rolling shutterby using these.

FIG. 13 is a flowchart showing an example of the flow of AF controlprocessing relating to a second exemplary embodiment.

FIG. 14 is a flowchart showing an example of the flow of AF controlprocessing relating to a third exemplary embodiment.

FIG. 15 is a flowchart showing another example of the flow of AF controlprocessing relating to the third exemplary embodiment.

FIG. 16 is a flowchart showing another example of the flow of AF controlprocessing relating to the third exemplary embodiment.

FIG. 17 is a flowchart showing another example of the flow of AF controlprocessing relating to the third exemplary embodiment.

FIG. 18 is a flowchart showing another example of the flow of AF controlprocessing relating to the third exemplary embodiment.

DETAILED DESCRIPTION OF THE INVENTION

Exemplary embodiments of the present invention are described in detailhereinafter with reference to the drawings. Note that, here, descriptionis given of a case in which the present invention is applied to adigital electronic still camera (hereinafter called “digital camera”)that carries out imaging of still images.

First Exemplary Embodiment

First, the configure of main portions of the electrical system of adigital camera 10 relating to the present exemplary embodiment isdescribed with reference to FIG. 1.

As shown in FIG. 1, the digital camera 10 relating to the presentexemplary embodiment is configured to include an optical unit 22, asolid-state imaging element 24, and an analog signal processing section26. The optical unit 22 is configured to include a lens for focusing theimage of the imaged subject. The solid-state imaging element (which ismade to be a CMOS (Complementary Metal Oxide Semiconductor) in thepresent exemplary embodiment) 24 is disposed at the rear of the opticalaxis of this lens. The analog signal processing section 26 carries outvarious types of analog signal processing on inputted analog signals.

Further, the digital camera 10 is configured to include ananalog/digital converter (hereinafter called “ADC”) 28 that convertsinputted analog signals into digital data, and a digital signalprocessing section 30 that carries out various types of digital signalprocessing on inputted digital data.

Note that the digital signal processing section 30 incorporates thereina line buffer of a predetermined capacity, and also carries out controlfor directly storing inputted digital data in a predetermined region ofa memory 48 that is described later.

The output end of the CMOS 24 is connected to the input end of theanalog signal processing section 26. Further, the output end of theanalog signal processing section 26 is connected to the input end of theADC 28. Moreover, the output end of the ADC 28 is connected to the inputend of the digital signal processing section 30. Accordingly, analogsignals, that express the image of the imaged subject and that areoutputted from the CMOS 24, are subjected to predetermined analog signalprocessings by the analog signal processing section 26, and areconverted into digital image data by the ADC 28, and thereafter, areinputted to the digital signal processing section 30.

On the other hand, the digital camera 10 is configured to include aliquid crystal display (hereinafter called “LCD”) 38, an LCD interface36, a CPU (Central Processing Unit) 40, the memory 48, and a memoryinterface 46. The liquid crystal display (hereinafter called “LCD”) 38displays the imaged image of the imaged subject and menu screens and thelike. The LCD interface 36 generates signals for causing the LCD 38 todisplay the image of the imaged subject or the menu screens or the like,and supplies the signals to the LCD 38. The CPU (Central ProcessingUnit) 40 governs the overall operations of the digital camera 10. Thememory 48 temporarily stores digital image data obtained by imaging, andthe like. The memory interface 46 controls access to the memory 48.

Moreover, the digital camera 10 is configured to include an externalmemory interface 50 for enabling a portable memory card 52 to beaccessed at the digital camera 10, and a compression/decompressionprocessing circuit 54 that carries out compression processing anddecompression processing on digital image data.

Note that, at the digital camera 10 of the present exemplary embodiment,a Flash

Memory is used as the memory 48, and an xD Picture Card (registeredtrademark) is used as the memory card 52. However, the memory 48 is notlimited to this.

The digital signal processing section 30, the LCD interface 36, the CPU40, the memory interface 46, the external memory interface 50, and thecompression/decompression processing circuit 54 are connected to oneanother via a system bus BUS. Accordingly, the CPU 40 can carry outcontrol of the operations of the digital signal processing section 30and the compression/decompression processing circuit 54, and display ofvarious types of information on the LCD 38 via the LCD interface 36, andaccess to the memory 48 and the memory card 52 via the memory interface46 and the external memory interface 50.

On the other hand, a timing generator 32, that mainly generates timingsignals (pulse signals) for driving the CMOS 24 and supplies the signalsto the CMOS 24, is provided at the digital camera 10. The driving of theCMOS 24 is controlled by the CPU 40 via the timing generator 32.

Note that the CMOS 24 has plural lines in which plural pixels arearrayed in the horizontal direction as will be described later, and iscontrolled by the rolling shutter method that controls the exposurestart timings and the read out timings per the pixels on a line. Notethat, hereinafter, description is given by using, as an example, a casein which the exposure start and read out timings differ per line, butthe present invention is not limited thereto.

Moreover, a motor driving section 34 is provided at the digital camera10. The driving of an unillustrated focal point adjusting motor, zoommotor and diaphragm driving motor that are provided at the optical unit22 also are controlled by the CPU 40 via the motor driving section 34.

Namely, the aforementioned lens relating to the present exemplaryembodiment has an imaging lens having a zoom lens and a focus lens, andhas an unillustrated lens driving mechanism. This lens driving mechanismincludes the aforementioned focal point adjusting motor, zoom motor anddiaphragm driving motor, and these motors are respectively driven bydriving signals supplied from the motor driving section 34 due tocontrol of the CPU 40.

Moreover, the digital camera 10 is provided with operation section 56that are configured to include various types of switches such as arelease switch (a so-called shutter), a power switch, a mode switchingswitch, a menu switch, an OK switch, a cancel switch, and the like. Therelease switch (a so-called shutter) is push-operated at the time ofexecuting imaging. The power switch is operated at the time of switchingthe on/off state of the power source of the digital camera 10. The modeswitching switch is operated at the time of setting the mode to eitherof an imaging mode, that is a mode that carries out imaging, and aplayback mode, that is a mode that plays back the image of the imagedsubject on the LCD 38. The menu switch is push-operated when making theLCD 38 display menu screens. The OK switch is push-operated whenconfirming the contents of operation up until then. The cancel switch ispush-operated when cancelling the contents of operation immediatelytherebefore. The operation section 56 is connected to the CPU 40.Accordingly, the CPU 40 can always know of the operated states of thisoperation section 56.

Note that the release switch of the digital camera 10 relating to thepresent exemplary embodiment is configured so as to be able to detectpushing operations in two states that are a state in which the releaseswitch is pushed-down to an intermediate position (called a“halfway-depressed state” hereinafter) and a state in which the releaseswitch is pushed-down to the final pushed-down position that is pastthis intermediate position (called a “fully depressed state”hereinafter).

Further, at the digital camera 10, due to the release switch being setin the halfway-depressed state, an AE (Automatic Exposure) functionworks and the state of exposure (the shutter speed, the state of thediaphragm) is set, and thereafter, the AF function works and the focusis controlled. In the digital camera 10, thereafter, when the releaseswitch is set continuously in the fully depressed state, exposure(imaging) is carried out.

Further, a flash 44, that emits light to be illuminated onto the imagedsubject as needed at the time of imaging, and a charging section 42,that is interposed between the flash 44 and the CPU 40 and chargeselectric power for causing the flash 44 to emit light due to control ofthe CPU 40, are provided at the digital camera 10. Moreover, the flash44 is connected to the CPU 40 as well, and the emission of light by theflash 44 is controlled by the CPU 40.

FIG. 2 is a plan view showing the overall configuration of the CMOS 24.Numerous pixels (light-receiving elements: photodiodes; not illustrated)are formed so as to be arrayed in a two-dimensional array at an imagingregion 70 of the CMOS 24. In this embodiment, there is a so-calledhoneycomb pixel array in which the even-numbered pixel rows are arrayedso as to each be offset by ½ of the pixel pitch with respect to theodd-numbered pixel rows.

Further, although not shown in FIG. 2, in the present exemplaryembodiment, R (red), G (green), B (blue) color are layered in a state ofbeing arrayed in a Bayer array at each of the plural pixels of theimaging region 70 that includes a phase difference detection region.Note that the array of RGB may be a striped array. Horizontal scancircuits 72 ₁, 72 ₂, and vertical scan circuits 74 ₁, 74 ₂ are furtherprovided at the CMOS 24 relating to the present exemplary embodiment.Note that, although not illustrated, horizontal signal lines areconnected to the horizontal scan circuits 72 ₁, 72 ₂, and verticalselection lines are connected to the vertical scan circuits 74 ₁, 74 ₂.

The vertical scan circuit 74 ₁ selects, through the vertical selectionlines and in units of a row (a line), respective pixels of a first pixelgroup of the odd-numbered rows disposed at the imaging region 70. Inthis case, the pixels are selected in order line-by-line from thebottommost end, and reading out of the pixel signals is carried outcollectively per line. Note that a CDS circuit, that carries outcorrelated double sampling processing on the respective pixel signals,that are read out in line units from the first pixel group, and reducesreset noise, may be provided. The horizontal scan circuit 72 ₁ selects,successively in pixel units from the left end, the pixel signals of onerow that are read out from the first pixel group. Due thereto, therespective pixel signals read out from the first pixel group areoutputted to the horizontal signal lines. The pixel signals, that aresuccessively outputted to the horizontal signal lines in this way, areamplified by latter-stage amplifiers (not shown), and thereafter, areoutputted to the exterior.

Further, the vertical scan circuit 74 ₂ selects, through the verticalselection lines and in units of a row, respective pixels of a secondpixel group of the even-numbered rows disposed at the imaging region 70.In this case, the pixels are selected in order line-by-line from thebottommost end, and reading out of the pixel signals is carried outcollectively per line. Note that a CDS circuit, that carries outcorrelated double sampling processing on the respective pixel signals,that are read out in line units from the second pixel group, and reducesreset noise, may be provided. The horizontal scan circuit 72 ₂ selects,successively in pixel units from the left end, the pixel signals of onerow that are outputted from the second pixel group. Due thereto, therespective pixel signals read out from the second pixel group areoutputted to the horizontal signal lines. The pixel signals, that aresuccessively outputted to the horizontal signal lines in this way, areamplified by latter-stage amplifiers (not shown), and thereafter, areoutputted to the exterior.

Note that, in the present exemplary embodiment, a rectangular phasedifference detection region is provided at a partial region, e.g., thecentral position, of the imaging region 70. Note that the phasedifference detection region may be provided at one place with respect tothe imaging region 70, or may be provided at plural places so that AFcan be made possible anywhere within the imaging region 70.

FIG. 3 is an enlarged schematic drawing of the surface of a portion ofthe interior of the phase difference detection region. FIG. 3illustrates a state in which the lines in which phase differencedetection pixels 1 x are arrayed (here, the odd-numbered lines), andlines in which phase difference detection pixels 1 y are arrayed (here,the even-numbered lines), are arrayed alternately. Also within the phasedifference detection region, there is a so-called honeycomb array inwhich the even-numbered pixel rows are arrayed so as to each be offsetby ½ of the pixel pitch with respect to the odd-numbered pixel rows.

Note that a state in which only the phase difference detection pixels 1x, 1 y are disposed is shown in FIG. 3. However, imaging pixels (pixelsother than the phase difference detection pixels 1 x, 1 y: regularpixels at which a light-blocking film is not provided and that are forimaging the image of the imaged subject) may be partially disposed.Further, only imaging pixels are disposed at the imaging region 70 otherthan the phase difference detection region (not shown).

In the illustrated example the respective pixels are shown as R (red), G(green), B (blue). R, G, B express the colors of the color filters thatare layered on the respective pixels, and the color filters areBayer-arrayed at the pixels of the odd-numbered rows, and the colorfilters are Bayer-arrayed at the pixels of the even-numbered rows. Duethereto, given that the two phase difference detection pixels 1 x, 1 ythat are adjacent diagonally are one set (pair), there is a state inwhich a color filter of the same color is disposed at the two phasedifference detection pixels 1 x, 1 y that are diagonally adjacent andconfigure a pair.

Further, light-blocking film openings 2 x, 2 y of the phase differencedetection pixels 1 x, 1 y are formed to be smaller than the imagingpixels, and the light-blocking film openings 2 x of the pixels 1 x areprovided so as to be eccentric toward the left direction, and thelight-blocking film openings 2 y of the pixels 1 y are provided so as tobe eccentric toward the right direction (the phase difference detectiondirection).

Due to such a configure, the light beam, that has passed through oneside (here, the left side) with respect to the main axis of the imaginglens, is incident on the phase difference detection pixels 1 x. Further,the phase difference detection pixels 1 y are disposed on the linesadjacent to the phase difference detection pixels 1 x that configure thepairs, and the light beam, that has passed through the other side (here,the right side) with respect to the main axis of the imaging lens, isincident on the phase difference detection pixels 1 y. As describedlater, in an out-of-focus state, offset arises in the positions andphases of the images detected by the phase difference detection pixels 1x, 1 y respectively, and therefore, this offset amount (phase differenceamount) is detected, and focus control is carried out.

Note that there is no need to use phase difference detection pixel pairsof all colors for range finding of the imaged subject, and phasedifference detection may be carried out by using only the phasedifference detection pixel pairs of a specific color, or phasedifference detection may be carried out by using specific phasedifference detection pixel pairs among the phase difference detectionpixel pairs of a specific color. Further, the phase difference detectionpixels 1 x, 1 y may also be used in forming the image of the imagedsubject.

FIG. 4 is an explanatory drawing for explaining a phase differencedetection method in a case in which the phase difference detectionpixels 1 x, 1 y, that are adjacent and at which G-color color filtersare provided, are used as pairs in phase difference detection for rangefinding of the imaged subject. Curve X shown at the bottom of FIG. 4 isa graph that plots the detection signal amounts of the G-color phasedifference detection pixels 1 x that are lined-up in one lateral row.Further, curve Y is a graph that plots the detection signal amounts ofthe G-color phase difference detection pixels 1 y that form pairs withthese pixels 1 x.

Because the pair of phase difference detection pixels 1 x, 1 y areadjacent pixels and are extremely close, it can be thought that theyreceive light from the same imaged subject. Therefore, if there are noeffects of distortion due the rolling shutter that are describedhereafter, it can be thought that curve X and curve Y have substantiallythe same shape, and that offset thereof in the left-right direction (thephase difference detecting direction) is the phase difference amountbetween the image seen at the one pixel 1 x and the image seen at theother pixel 1 y of the pair of phase difference detection pixels thatare pupil-divided.

By carrying out correlation computation on these curve X and curve Y,the lateral offset amount (phase difference amount) can be determined,and the distance to the imaged subject can be computed from this phasedifference amount. It suffices to employ a known method (e.g., themethod disclosed in Japanese Patent Application Laid-Open No. 2010-8443or the method disclosed in Japanese Patent Application Laid-Open No.2010-91991) as the method of determining an evaluation value of thecorrelation amount of curve X and curve Y. For example, the integratedvalue of the absolute value of the difference between each point X(i)that configures curve X and each point Y(i+j) that configures curve Y ismade to be the evaluation value, and the value of j that provides themaximum evaluation value is made to be the phase difference amount.

Further, on the basis of the distance to the imaged subject that isdetermined from this phase difference amount, the motor driving section34 is controlled, the focal point adjusting motor of the optical unit 22is driven, and the focus lens position is controlled so as to focus onthe imaged subject.

However, in the present exemplary embodiment, a CMOS that is controlledby the rolling shutter method is used as the solid-state imagingelement. Accordingly, when carrying out correlation computation on thebasis of detection signals that are acquired from a phase differencedetection pixel pair that is formed from two phase difference detectionpixels whose read out timings are not the same, if the imaged subjectmoves or changes during the lag in these timings, distortion arises inthe image of the imaged subject that is picked-up, and the effects ofdistortion due to this rolling shutter (a distortion amount) arises inthe phase difference amount that is determined by correlationcomputation (refer to FIG. 5A as well).

On the other hand, as shown in FIG. 5B, if, for example, two phasedifference detection pixels 1 x (shown as phase difference detectionpixels A, A′ in FIG. 5B), that have the same distance (position in thehorizontal direction) from one ends of lines, are made to be one set(pair), and correlation computation of the detection signals of thispair is carried out, the eccentric directions of the light-blocking filmopenings of the respective phase difference detection pixels A, A′ arethe same (a light beam that passes through the same side with respect tothe main axis of the imaging lens is incident thereon). Therefore, inthe present exemplary embodiment, it is possible to compute only thedistortion amount due to the rolling shutter. In the present exemplaryembodiment, by using the detection signals from these pairs of phasedifference detection pixels, the phase difference amounts that arecomputed at the above-described usual phase difference detection pixelpairs are corrected, and AF control is carried out.

Note that, hereinafter, a pair of phase difference detection pixels (apair that is formed from the phase difference detection pixels 1 x, 1y), that are adjacent diagonally and that detect the phase differencefor imaged subject range finding, is simply called a phase differencedetection pixel pair. Further, a pair of phase difference detectionpixels (a pair that is formed from two phase difference detection pixels1 x that are disposed on odd-numbered lines, or a pair that is formedfrom two phase difference detection pixels 1 y that are disposed oneven-numbered lines), that are for detecting the distortion amount dueto the rolling shutter, are called a rolling detection pixel pair inorder to distinguish from the aforementioned phase difference detectionpixel pair.

FIG. 6 is a flowchart showing the flow of AF control relating to thepresent exemplary embodiment.

In step 100, correlation computation is carried out on detection signals(hereinafter also called phase difference detection pixel signals uponoccasion), that are read out respectively from the respective phasedifference detection pixels that configure phase difference detectionpixel pairs that are formed from predetermined phase differencedetection pixels 1 x, 1 y that are diagonally adjacent, and phasedifference amounts are determined. For example, in the example shown inFIG. 7, the pixels that configure the phase difference detection pixelpairs are hatched (the same holds as well for FIG. 8 through FIG. 12that are described hereinafter). Concretely, the respective pairs ofphase difference detection pixels 1 x, 1 y, that are diagonally adjacentin the seventh line and the eighth line and at which G color filters areprovided, are used as the phase difference detection pixel pairs.

In step 102, correlation computation is carried out on the detectionsignals (hereinafter also called rolling detection pixel signals uponoccasion), that are read out from the respective phase differencedetection pixels that configure rolling detection pixel pairs, anddistortion amounts due to the rolling shutter are determined Forexample, the combination of the phase difference detection pixel 1 x,that is that is disposed on an odd-numbered line among theaforementioned phase difference detection pixel pairs, and the phasedifference detection pixel 1 x, that is disposed on an odd-numbered linethat is different than the odd-numbered line on which the aforementionedphase difference detection pixel 1 x is disposed and at which a colorfilter of the same color is provided, may be made to be a rollingdetection pixel pair. Further, the combination of the phase differencedetection pixel 1 y, that is that is disposed on an even-numbered lineamong the aforementioned phase difference detection pixel pairs, and thephase difference detection pixel 1 y, that is disposed on aneven-numbered line that is different than the even-numbered line onwhich the aforementioned phase difference detection pixel 1 y isdisposed and at which a color filter of the same color is provided, maybe made to be a rolling detection pixel pair. In FIG. 7, the examples ofthe pixels that configure the rolling detection pixel pairs are markedin bold lines (the same holds as well for FIG. 8 through FIG. 12 thatare described hereinafter). Concretely, pixels, that are combinations ofthe phase difference detection pixels 1 x of G color in the seventh lineand the phase difference detection pixels 1 x of G color of the eleventhline, and whose distances from the ends of the respective lines, i.e.,positions in the horizontal direction, are the same, are made to berolling detection pixel pairs.

Namely, in the example shown in FIG. 7, correlation computation iscarried out on the detection signals of each of the rolling detectionpixel pair that is configured by the phase difference detection pixel 1x of the seventh line and the third column and the phase differencedetection pixel 1 x of the eleventh line and the third column, and therolling detection pixel pair that is configured by the phase differencedetection pixel 1 x of the seventh line and the seventh column and thephase difference detection pixel 1 x of the eleventh line and theseventh column, and the rolling detection pixel pair that is configuredby the phase difference detection pixel 1 x of the seventh line and theeleventh column and the phase difference detection pixel 1 x of theeleventh line and the eleventh column, and the rolling detection pixelpair that is configured by the phase difference detection pixel 1 x ofthe seventh line and the fifteenth column and the phase differencedetection pixel 1 x of the eleventh line and the fifteenth column. Theoffset amounts determined from this correlation computation aremultiplied by ¼, and the distortion amount due to the rolling shutter isdetermined

Here, the reason why the offset amounts are multiplied by ¼ is that thephase difference detection pixel pairs are pixels of the seventh lineand the eight line, whereas the rolling detection pixel pairs are pixelsof the seventh line and the eleventh line. Therefore, the separateddistance in the vertical direction of the respective pixels of therolling detection pixel pairs is four times the separation distance inthe vertical direction of the respective pixels of the phase differencedetection pixel pairs, and four times the time is needed for readingout.

Note that, here, explanation is given of an example in which thedistortion amount due to the rolling shutter is computed by using setsof G pixels (sets of the phase difference detection pixels 1 x of Gcolor) of the seventh line and the eleventh line. However, thedistortion amount due to the rolling shutter may be computed by using Gpixels of the seventh line and the fifteenth line. In this case, thecorrelation computation results of the rolling detection pixel signalsmust be multiplied by ⅛. Further, the distortion amount due to therolling shutter may be computed by using sets of G pixels (sets of thephase difference detection pixels 1 y of G color) of the eighth line andthe twelfth line.

In step 104, the distortion amount due to the rolling shutter that wasdetermined in step 102 is subtracted from the phase difference amountdetermined in step 100, and the phase difference amount determined instep 100 is corrected.

In step 106, focus control is carried out as described above, on thebasis of the corrected phase difference amount.

MODIFIED EXAMPLE 1 OF COMPUTATION OF DISTORTION AMOUNT DUE TO ROLLINGSHUTTER

Note that the method of computing the distortion amount due to therolling shutter is not limited to the example that was described byusing above-described FIG. 7. For example, plural distortion amounts dueto the rolling shutter may be computed, and these may be averaged so asto determine a final distortion amount due to the rolling shutter, andthis may be used in correction.

Concretely, for example, correlation computation of the detectionsignals read out from the rolling detection pixel pairs shown in FIG. 7may be carried out and the distortion amount due to the rolling shutterdetermined (this is called the first distortion amount due to therolling shutter), and, in addition, as shown in FIG. 8, correlationcomputation may be carried out on the detection signals that are readout from each of the rolling detection pixel pair configured by thephase difference detection pixel 1 y of the eighth line and the fourthcolumn and the phase difference detection pixel 1 y of the twelfth lineand the fourth column, and the rolling detection pixel pair configuredby the phase difference detection pixel 1 y of the eighth line and theeighth column and the phase difference detection pixel 1 y of thetwelfth line and the eighth column, and the rolling detection pixel pairconfigured by the phase difference detection pixel 1 y of the eighthline and the twelfth column and the phase difference detection pixel 1 yof the twelfth line and the twelfth column, and the rolling detectionpixel pair configured by the phase difference detection pixel 1 y of theeighth line and the sixteenth column and the phase difference detectionpixel 1 y of the twelfth line and the sixteenth column. Moreover, inthis method, in order to determine the distortion amount due to therolling shutter (this is called the second distortion amount due to therolling shutter), the average value of the first distortion amount dueto the rolling shutter and the second distortion amount due to therolling shutter may be determined, and this average value may be used inthe correction in step 104. Due thereto, the computation accuracy of thedistortion amount due to the rolling shutter becomes higher, and theprecision of the AF control improves.

Note that, here, description is given of an example in which twodistortion amounts due to the rolling shutter are computed and averagedand used in correction. However, three or more distortion amounts due tothe rolling shutter may be computed and averaged and used in correction.

MODIFIED EXAMPLE 2 OF COMPUTATION OF DISTORTION AMOUNT DUE TO ROLLINGSHUTTER

Note that a “usual imaging” mode and a “pixel addition imaging” mode maybe provided at the digital camera 10. In the “usual imaging” mode, ahighly detailed image of the imaged subject is generated from theindividual output signals of all of the pixels. In the “pixel additionimaging” mode, highly sensitive imaging is carried out instead of makingthe resolution be low resolution, by adding the signals of pluralpixels, such as 2-pixel addition or 4-pixel addition or the like, to theoutput signals of all of the pixels. Which imaging is to be carried outis implemented by switching the driving pulses that the timing generator32 supplies to the solid-state imaging element (CMOS) 24. As a result offour pixel addition, the resolution of the image of the imaged subjectbecomes ¼ of the number of pixels of the solid-state imaging element,and the exposure amount becomes four times. Therefore, it becomespossible to obtain an image of a high S/N even in dark scenes.

In this case, it suffices to make it such that the AF control alsocarries out control in accordance with the imaging mode. Namely, thephase difference amount can be determined by carrying out correlationcomputation on an addition signal, that is obtained by adding detectionsignals of plural phase difference detection pixels 1 x whose distancesfrom one ends of lines are equal to one another, and an addition signal,that is obtained by adding detection signals of plural phase differencedetection pixels 1 y whose distances from one ends of lines are equal toone another. Note that, in the following explanation, there are alsocases in which the addition of detection signals from plural pixels thathave the same difference from one ends of lines is called verticaladdition.

For example, as shown in FIG. 9, correlation computation is carried outon addition signals, that are obtained by adding the detection signalsof the G-color phase difference detection pixels 1 x of the third,seventh, eleventh, fifteenth lines, and addition signals, that areobtained by adding the detection signals of the G-color phase differencedetection pixels 1 y of the fourth, eighth, twelfth, sixteenth lines,and a phase difference amount is determined, and AF control is carriedout. Further, in this case as well, the distortion amount due to therolling shutter may be computed and corrected. Here, not only theG-color phase difference detection pixels 1 x of the seventh line andthe eleventh line are used, but also, the G-color phase differencedetection pixels 1 x of the third line and the fifteenth line are usedin combination therewith.

More concretely, addition signal a, that is obtained by adding thedetection signal of the G-color phase difference detection pixel 1 x ofthe third line and the detection signal of the G-color phase differencedetection pixel 1 x of the eleventh line, may be determined per pixelswhose positions in the horizontal direction are the same, and additionsignal b, that is obtained by adding the detection signal of the G-colorphase difference detection pixel 1 x of the seventh line and thedetection signal of the G-color phase difference detection pixel 1 x ofthe fifteenth line, may be determined per pixels whose positions in thehorizontal direction are the same, and correlation computation may becarried out on these addition signals a, b for the pixels whosepositions in the horizontal direction are the same, and the distortionamount due to the rolling shutter may be determined.

By combining numerous phase difference detection pixels and using themin the computing of the distortion amount due to the rolling shutter inthis way, the high S/N of the signal increases, and the accuracy ofcomputing the distortion amount due to the rolling shutter improves.

Still further, addition signal c, that is obtained by adding thedetection signal of the G-color phase difference detection pixel 1 y ofthe fourth line and the detection signal of the G-color phase differencedetection pixel 1 y of the twelfth line, is determined per pixels whosepositions in the horizontal direction are the same. Next, additionsignal d, that is obtained by adding the detection signal of the G-colorphase difference detection pixel 1 y of the eighth line and thedetection signal of the G-color phase difference detection pixel 1 y ofthe sixteenth line, is determined per pixels whose positions in thehorizontal direction are the same. Next, correlation computation iscarried out on the addition signals c, d for the pixels whose positionsin the horizontal direction are the same, and the distortion amount dueto the rolling shutter is determined, and further, the average value ofthis distortion amount and the distortion amount due to the rollingshutter, that was determined from above-described addition signals a b,may be determined as the final distortion amount due to the rollingshutter.

MODIFIED EXAMPLE 3 OF COMPUTATION OF DISTORTION AMOUNT DUE TO ROLLINGSHUTTER

Still further, the distortion amount due to the rolling shutter can becomputed by carrying out vertical addition by using pixels of differentcolors (not illustrated). Concretely, for example, an addition signal e,that is obtained by adding the detection signal of the R-color phasedifference detection pixel 1 x of the fifth line and the detectionsignal of the G-color phase difference detection pixel 1 x of theseventh line, is determined per pixels whose positions in the horizontaldirection are the same. Next, an addition signal f, that is obtained byadding the detection signal of the G-color phase difference detectionpixel 1 x of the seventh line and the detection signal of the R-colorphase difference detection pixel 1 x of the ninth line, is determinedper pixels whose positions in the horizontal direction are the same.Correlation computation may be carried out on these addition signals e,f for the pixels whose positions in the horizontal direction are thesame, and the distortion amount due to the rolling shutter may bedetermined

MODIFIED EXAMPLE 4 OF COMPUTATION OF DISTORTION AMOUNT DUE TO ROLLINGSHUTTER

Still further, although not illustrated, also in cases in which two ormore distortion amounts due to the rolling shutter are determined,averaged and used as shown as an example in FIG. 8, vertical additioncan be carried out by using pixels of different colors, and thedistortion amount due to the rolling shutter can be determined

Concretely, for example, the addition signal e, that is obtained byadding the detection signal of the R-color phase difference detectionpixel 1 x of the fifth line and the detection signal of the G-colorphase difference detection pixel 1 x of the seventh line, is determinedper pixels whose positions in the horizontal direction are the same.Next, the addition signal f, that is obtained by adding the detectionsignal of the G-color phase difference detection pixel 1 x of theseventh line and the detection signal of the R-color phase differencedetection pixel 1 x of the ninth line, is determined per pixels whosepositions in the horizontal direction are the same. Next, correlationcomputation of the addition signals e, f for the pixels whose positionsin the horizontal direction are the same is carried out, and thedistortion amount due to the rolling shutter is determined (this iscalled the first distortion amount due to the rolling shutter), and anaddition signal g, that is obtained by adding the detection signal ofthe R-color phase difference detection pixel 1 y of the sixth line andthe detection signal of the G-color phase difference detection pixel 1 yof the eighth line, is determined per pixels whose positions in thehorizontal direction are the same. Next, an addition signal h, that isobtained by adding the detection signal of the G-color phase differencedetection pixel 1 y of the eighth line and the detection signal of theR-color phase difference detection pixel 1 y of the tenth line, isdetermined per pixels whose positions in the horizontal direction arethe same. Next, correlation computation of the addition signals g, h forthe pixels whose positions in the horizontal direction are the same iscarried out, and the distortion amount due to the rolling shutter isdetermined (this is called the second distortion amount due to therolling shutter). Moreover, the average value of the first distortionamount due to the rolling shutter and the second distortion amount dueto the rolling shutter is determined as the final distortion amount dueto the rolling shutter, and is used in correction of the phasedifference amount.

Due thereto, the accuracy of computing the distortion amount due to therolling shutter may be improved, and the accuracy of the AF control maybe improved.

MODIFIED EXAMPLE 5 OF COMPUTATION OF DISTORTION AMOUNT DUE TO ROLLINGSHUTTER

Further, the plural distortion amounts due to the rolling shutter, thatare determined from detection signals of plural rolling detection pixelpairs of different colors that are lined-up at the same position in thevertical direction, can also be averaged and used. Description is givenhereinafter with reference to FIG. 10, FIG. 11 and FIG. 12. Note that,in FIG. 10, FIG. 11 and FIG. 12 as well, the pixels that are marked byhatching are pixels that are used in computing the phase differenceamount used in range finding, and the pixels drawn in bold lines arepixels that are used in computing the distortion amount due to therolling shutter, in the same way as in FIG. 7, FIG. 8 and FIG. 9. Asshown in FIG. 10, in a case in which the phase difference amount isdetermined by using the G-color phase difference detection pixels 1 x ofthe seventh line and the phase difference detection pixels 1 y of theeighth line as the phase difference detection pixel pairs, thedistortion amount due to the rolling shutter, that is determined bycorrelation computation of the G-color detection signals of the seventhline and the eleventh line, and the distortion amount due to the rollingshutter, that is determined by correlation computation of the B pixelsof the seventh line and the eleventh line, are averaged, and the finaldistortion amount due to the rolling shutter is determined, and this isused in correcting of the phase difference amount.

Further, as shown in FIG. 11, in a case in which the phase differenceamount is determined by using the G-color phase difference detectionpixels 1 x of the seventh line and the phase difference detection pixels1 y of the eighth line as the phase difference detection pixel pairs,first the distortion amount due to the rolling shutter, that isdetermined by correlation computation of the G-color detection signalsof the seventh line and the eleventh line, and the distortion amount dueto the rolling shutter, that is determined by correlation computation ofthe detection signals of the B pixels of the seventh line and theeleventh line, are averaged and the first distortion amount due to therolling shutter is determined. Moreover, the distortion amount due tothe rolling shutter, that is determined by correlation computation ofthe G-color detection signals of the eighth line and the twelfth line,and the distortion amount due to the rolling shutter, that is determinedby correlation computation of the detection signals of the B pixels ofthe eighth line and the twelfth line, are averaged and the seconddistortion amount due to the rolling shutter is determined. Then, theaverage value of the first distortion amount due to the rolling shutterand the second distortion amount due to the rolling shutter isdetermined as the final distortion amount due to the rolling shutter,and this may be used in correcting the phase difference amount.

Further, as shown in FIG. 12, also in a case in which the distortionamount due to the rolling shutter is determined by vertical addition,similarly, first, an addition signal k, that is obtained by adding thedetection signal of the G-color phase difference detection pixel 1 x ofthe third line and the detection signal of the G-color phase differencedetection pixel 1 x of the eleventh line, is determined per pixels whosepositions in the horizontal direction are the same. Next, an additionsignal 1, that is obtained by adding the detection signal of the G-colorphase difference detection pixel 1 x of the seventh line and thedetection signal of the G-color phase difference detection pixel 1 x ofthe fifteenth line, is determined per pixels whose positions in thehorizontal direction are the same. Next, correlation computation of theaddition signals k, 1 for the pixels whose positions in the horizontaldirection are the same is carried out, and a first distortion amount dueto the rolling shutter is determined Moreover, an addition signal m,that is obtained by adding the detection signal of the B-color phasedifference detection pixel 1 x of the third line and the detectionsignal of the B-color phase difference detection pixel 1 x of theeleventh line, is determined per pixels whose positions in thehorizontal direction are the same, and an addition signal n, that isobtained by adding the detection signal of the B-color phase differencedetection pixel 1 x of the seventh line and the detection signal of theB-color phase difference detection pixel 1 x of the fifteenth line, isdetermined per pixels whose positions in the horizontal direction arethe same. Moreover, correlation computation of the addition signals m, nfor the pixels whose positions in the horizontal direction are the sameis carried out, and a second distortion amount due to the rollingshutter is determined Then, the average value of the first distortionamount due to the rolling shutter and the second distortion amount dueto the rolling shutter is determined as the final distortion amount dueto the rolling shutter, and this may be used in correction of the phasedifference amount.

Note that the distortion amount due to the rolling shutter may bedetermined as follows (not illustrated). First, the final distortionamount due to the rolling shutter, that was determined by computation asdescribed by using FIG. 12, is here not called the final distortionamount due to the rolling shutter, and for the time being, this is madeto be a distortion amount A due to the rolling shutter. Moreover, anaddition signal p, that is obtained by adding the detection signal ofthe G-color phase difference detection pixel 1 y of the fourth line andthe detection signal of the G-color phase difference detection pixel 1 yof the twelfth line, is determined per pixels whose positions in thehorizontal direction are the same. Next, an addition signal q, that isobtained by adding the detection signal of the G-color phase differencedetection pixel 1 y of the eighth line and the detection signal of theG-color phase difference detection pixel 1 y of the sixteenth line, isdetermined per pixels whose positions in the horizontal direction arethe same. Correlation computation of the addition signals p, q for thepixels whose positions in the horizontal direction are the same iscarried out, and a third distortion amount due to the rolling shutter isdetermined. Next, an addition signal r, that is obtained by adding thedetection signal of the B-color phase difference detection pixel 1 y ofthe fourth line and the detection signal of the B-color phase differencedetection pixel 1 y of the twelfth line, is determined per pixels whosepositions in the horizontal direction are the same, and an additionsignal s, that is obtained by adding the detection signal of the B-colorphase difference detection pixel 1 y of the eighth line and thedetection signal of the B-color phase difference detection pixel 1 y ofthe sixteenth line, is determined per pixels whose positions in thehorizontal direction are the same. Moreover, correlation computation ofthe addition signals r, s for the pixels whose positions in thehorizontal direction are the same is carried out, and a fourthdistortion amount due to the rolling shutter is determined Moreover, theaverage value of the third distortion amount due to the rolling shutterand the fourth distortion amount due to the rolling shutter is made tobe distortion amount B due to the rolling shutter. Then, the averagevalue of this distortion amount A due to the rolling shutter anddistortion amount B due to the rolling shutter is determined as thefinal distortion amount due to the rolling shutter, and this may be usedin correcting the phase difference amount.

In this way, the distortion amount due to the rolling shutter iscomputed by using and averaging rolling detection pixel pairs ofdifferent colors, and the computational accuracy of the distortionamount due to the rolling shutter may be improved.

Note that, in the present exemplary embodiment, description is given ofan example in which rolling correction is always carried out. However,the present invention is not limited thereto. For example, a switchingmeans that switches between a first mode, that carries out rollingcorrection in the AF control, and a second mode, that does not carry outrolling correction, may be provided, and AF control may be carried outin accordance with the mode that a user has switched to by using thisswitching means.

Second Exemplary Embodiment

Note that the distortion amount due to the rolling shutter varies inaccordance with movement of the imaged subject and changes in the angleof view, and therefore, is not always constant. Thus, in a case in whichthe final distortion amount due to the rolling shutter is computed byaveraging plural distortion amounts due to the rolling shutter such asexplained by using above-described FIG. 8 and FIG. 10 through FIG. 12,if the plural distortion amounts due to the rolling shutter differgreatly, it can be determined that the movement of the imaged subject orthe angle of view has changed suddenly, and the AF operation may becancelled. This control is described in detail hereinafter. Note that,because the configuration of the digital camera 10 of the presentexemplary embodiment is similar to that of the first exemplaryembodiment, description thereof is omitted.

In FIG. 13, in step 110, correlation computation of phase differencedetection pixel signals is carried out and a phase difference amount isdetermined, as described in the first exemplary embodiment.

In step 112, as described by using FIG. 8 and FIGS. 10 through 12 in thefirst exemplary embodiment, the plural distortion amounts due to rollingshutter are determined, and these are averaged, and the final distortionamount due to the rolling shutter is determined

Note that the plural distortion amounts due to the rolling shutter, thatare computed before the final distortion amount due to the rollingshutter is computed, are stored in a predetermined storing means untilthe determination in step 114, that is described hereafter, ends.

In step 114, the plural distortion amounts due to the rolling shutterthat are stored in the storing means (except for the final distortionamount due to the rolling shutter) are compared with one another, and itis determined whether or not there is a distortion amount for which thisdifference is greater than or equal to a threshold value. If thedetermination is negative here, the process moves on to step 116 wherecorrection is carried out by subtracting the aforementioned distortionamount due to the rolling shutter that was determined finally, from thephase difference amount determined in step 110. Then, in step 118, focalpoint control is carried out on the basis of this corrected phasedifference amount.

On the other hand, if the determination in step 114 is affirmative, theprocess proceeds to step 120 where error processing is carried out, andthe present AF control is ended. This error processing is, for example,the displaying of an error message, or the like. Further, it may be madesuch that, after the present AF control is ended one time, AF control isexecuted again.

As described above, if the difference in the distortion amounts due tothe rolling shutter is large, the AF control process is ended beforefocus control is carried out, and therefore, miss-focusing may beprevented.

Note that, here, description is given of an example in which the finaldistortion amount due to the rolling shutter is determined before thedetermination in step 114. However, after the determination in step 114is negative, the final distortion amount due to the rolling shutter maybe determined and used in correction.

Further, a switching means may be provided at the digital camera 10 thatswitches between a first mode, that carries out rolling correction in AFcontrol, and a second mode, in which rolling correction is not carriedout when the difference in plural computed distortion amounts due to therolling shutter is large as described in the present exemplaryembodiment, and AF control may be carried out in accordance with themode that a user switches to by this switching means.

Third Exemplary Embodiment

In the first exemplary embodiment, description is given of an example inwhich, at the time of AF control, the distortion amount due to therolling shutter is always computed and corrected. However, theprocessing of computing and correcting the distortion amount due to therolling shutter may be omitted in cases in which it is presumed that theeffects of distortion due to the rolling shutter are small. Detaileddescription is given hereinafter.

Note that, because the configuration of the digital camera 10 of thepresent exemplary embodiment is similar to the first exemplaryembodiment, description thereof is omitted.

FIG. 14 is a flowchart showing an example of the flow of AF controlprocessing relating to the present exemplary embodiment.

In step 200, correlation computation of phase difference detection pixelsignals is carried out and a phase difference amount is determined, asdescribed in the first exemplary embodiment.

In step 202, it is determined whether or not the AF region is a sizethat is greater than or equal to a predetermined threshold value. Here,the AF region is the region in which the focal point is adjusted. Thereare cases in which the digital camera 10 is configured such that theposition and the size of the AF region can be set arbitrarily by theuser of the digital camera 10, and cases in which the digital camera 10is configured such that the size of the AF region is set in accordancewith the imaging mode, and the like. In the present exemplaryembodiment, information of the size of the AF region that is set at thedigital camera 10 is acquired, and is compared with a predeterminedthreshold value.

When the determination in step 202 is affirmative, in step 204,correlation computation of rolling detection pixel signals is carriedout and the distortion amount due to the rolling shutter is determined,as described in the first exemplary embodiment. In step 206, thedistortion amount due to the rolling shutter, that was determined instep 204, is subtracted from the phase difference amount determined instep 200, and the phase difference amount determined in step 200 iscorrected. Then, in step 208, focus control is carried out on the basisof the corrected phase difference amount.

On the other hand, when the determination in step 202 is negative, step204 and step 206 are skipped, and the process proceeds to step 208. Inthis case, in step 208, focus control is carried out by using as is thephase difference amount determined in step 200 (the phase differenceamount that has not been corrected by the distortion amount due to therolling shutter).

If the AF region is not that large, the number of phase differencedetection pixels that detect the phase difference for range finding alsois small, and it can be thought that the effects of distortion due tothe rolling shutter are small. Thus, in the present example, if the AFregion is less than the threshold value, AF control is carried outwithout carrying out computation and correction of the distortion amountdue to the rolling shutter. Due thereto, the time required for AFcontrol may be shortened.

FIG. 15 is a flowchart showing another example of the flow of AF controlprocessing.

In step 300, correlation computation of phase difference detection pixelsignals is carried out and a phase difference amount is determined, asdescribed in the first exemplary embodiment.

In step 302, it is determined whether or not the number of read outpixels (the number of phase difference detection pixels that were usedin order to compute the phase difference amount in step 300) is greaterthan or equal to a predetermined threshold value. If the determinationin step 302 is affirmative, in step 304, as described in the firstexemplary embodiment, correlation computation of the rolling detectionpixel signals is carried out, and the distortion amount due to therolling shutter is determined. In step 306, the distortion amount due tothe rolling shutter, that was determined in step 304, is subtracted fromthe phase difference amount determined in step 300, and the phasedifference amount determined in step 300 is corrected. Then, in step308, focus control is carried out on the basis of the corrected phasedifference amount.

On the other hand, if the determination in step 302 is negative, step304 and step 306 are skipped, and the process proceeds to step 308. Inthis case, in step 308, focus control is carried out by using as is thephase difference amount that was determined in step 300 (the phasedifference amount that is not corrected by the distortion amount due tothe rolling shutter).

If the number of read out pixels is small, it can be thought that theeffects of distortion due to the rolling shutter are small. Thus, in thepresent exemplary embodiment, if the number of read out pixels is lessthan the threshold value, AF control is carried out without carrying outcomputation and correction of the distortion amount due to the rollingshutter. Due thereto, the time required for AF control may be shortened.

Note that the aforementioned threshold value may be changed inaccordance with the angle of view. More concretely, for example, if thedigital camera 10 is configured such that it is possible to switchbetween a wide (wide angle) mode, a standard mode and a telephoto(telephoto) mode, a threshold value may be set in advance for each mode,and the threshold value may be changed in accordance with the imagingmode at the time of AF control. Note that, the further that the angle ofview is toward the telephoto side, the greater the effects of thedistortion due to the rolling shutter can be assumed to be, andtherefore, the threshold value at the telephoto side may be set to besmall as compared with the wide side.

FIG. 16 is a flowchart showing another example of the flow of AF controlprocessing.

In step 400, correlation computation of phase difference detection pixelsignals is carried out and a phase difference amount is determined, asdescribed in the first exemplary embodiment.

In step 402, it is determined whether or not the imaged subject distanceis greater than or equal to a threshold value. Here, an imaged subjectdistance, that is determined provisionally from the phase differenceamount that was determined in above-described step 400, is compared witha predetermined threshold value. Here, the threshold value that iscompared is changed in accordance with the size of the AF region or theaforementioned number of read out pixels. If the determination in step402 is affirmative, in step 404, as described in the first exemplaryembodiment, correlation computation of rolling detection pixel signalsis carried out, and the distortion amount due to the rolling shutter isdetermined In step 406, the distortion amount due to the rollingshutter, that was determined in step 404, is subtracted from the phasedifference amount determined in step 400, and the phase differenceamount determined in step 400 is corrected. Then, in step 408, focuscontrol is carried out on the basis of the corrected phase differenceamount.

On the other hand, if the determination in step 402 is negative, step404 and step 406 are skipped, and the process proceeds to step 408. Inthis case, in step 408, focus control is carried out by using as is thephase difference amount that was determined in step 400 (the phasedifference amount that is not corrected by the distortion amount due tothe rolling shutter).

The degree of the effect of the rolling changes due to movement of theimaged subject within the imaging angle of view. In particular, it isthought that, the longer the imaged subject distance, the greater theeffect of distortion due to the rolling shutter. Thus, in the presentexample, when the imaged subject distance is longer than or equal to athreshold value, computation and correction of the distortion amount dueto the rolling shutter are carried out, and, when the imaged subjectdistance is shorter than the threshold value, computation and correctionof the distortion amount due to the rolling shutter are not carried out.

FIG. 17 is a flowchart showing another example of the flow of AF controlprocessing.

In step 500, correlation computation of phase difference detection pixelsignals is carried out and a phase difference amount is determined, asdescribed in the first exemplary embodiment.

In step 502, moving body detection within the angle of view is carriedout. For example, a known motion vector may be computed between pastimage data that is stored in the memory 48 and the image data of thistime, and detection may be carried out on the basis of the magnitude ofthe motion vector.

In step 504, on the basis above-described detection results, it isdetermined whether or not a moving body exists within the angle of view.If the determination in step 504 is affirmative, in step 506,correlation computation of rolling detection pixel signals is carriedout and the distortion amount due to the rolling shutter is determinedas described in the first exemplary embodiment. In step 508, thedistortion amount due to the rolling shutter, that was determined instep 506, is subtracted from the phase difference amount determined instep 500, and the phase difference amount determined in step 500 iscorrected. Then, in step 510, focus control is carried out on the basisof the corrected phase difference amount.

On the other hand, if the determination in step 504 is negative, step506 and step 508 are skipped, and the process proceeds to step 510. Inthis case, in step 510, focus control is carried out by using as is thephase difference amount that was determined in step 500 (the phasedifference amount that is not corrected by the distortion amount due tothe rolling shutter).

Rolling occurs in cases in which a moving body exists within the imagingangle of view. Accordingly, in the present example, a moving body isdetected, and computation and correction of the distortion amount due tothe rolling shutter are carried out only in cases in which a moving bodyexists, and computation and correction of the distortion amount due tothe rolling shutter are not carried out in cases in which a moving bodydoes not exist.

FIG. 18 is a flowchart showing another example of the flow of AF controlprocessing.

In step 600, correlation computation of phase difference detection pixelsignals is carried out and a phase difference amount is determined, asdescribed in the first exemplary embodiment.

In step 602, moving body detection within the AF region is carried out.In the moving body detection, for example, a known motion vector may becomputed between past image data that is stored in the memory 48 and theimage data of this time, and detection may be carried out on the basisof the magnitude of the motion vector.

In step 604, on the basis above-described detection results, it isdetermined whether or not a moving body exists within the AF region. Ifthe determination in step 604 is affirmative, in step 606, correlationcomputation of rolling detection pixel signals is carried out and thedistortion amount due to the rolling shutter is determined as describedin the first exemplary embodiment. In step 608, the distortion amountdue to the rolling shutter, that was determined in step 606, issubtracted from the phase difference amount determined in step 600, andthe phase difference amount determined in step 600 is corrected. Then,in step 610, focus control is carried out on the basis of the correctedphase difference amount.

On the other hand, if the determination in step 604 is negative, step606 and step 608 are skipped, and the process proceeds to step 610. Inthis case, in step 610, focus control is carried out by using as is thephase difference amount that was determined in step 600 (the phasedifference amount that is not corrected by the distortion amount due tothe rolling shutter).

Rolling occurs in cases in which a moving body exists within the imagingangle of view. Accordingly, in the present example, a moving body isdetected within the AF region in particular, and computation andcorrection of the distortion amount due to the rolling shutter arecarried out only in cases in which a moving body exists within the AFregion, and computation and correction of the distortion amount due tothe rolling shutter are not carried out in cases in which a moving bodydoes not exist.

As described above, in the present exemplary embodiment, in cases inwhich it is presumed that the effect of distortion due to the rollingshutter is small, computation and correction of the distortion amountdue to the rolling shutter are not carried out, and, in other cases,computation and correction of the distortion amount due to the rollingshutter are carried out. Therefore, in the present exemplary embodiment,wasteful time in AF control may be cut while the effects of distortiondue to the rolling shutter are suppressed.

Note that, in the present exemplary embodiment, whether or notcomputation and correction of the distortion amount due to the rollingshutter are to be carried out is determined in accordance with any ofthe size of the AF region, the number of read out pixels, the imagedsubject distance, movement of the imaged subject within the imagingangle of view, and movement of the imaged subject within the AF region.However, the present invention is not limited thereto. For example,whether or not computation and correction of the distortion amount dueto the rolling shutter are to be carried out may be determined inaccordance with at least one of the size of the AF region, the number ofread out pixels, the imaged subject distance, movement of the imagedsubject within the imaging angle of view, and movement of the imagedsubject within the AF region.

Further, a switching means that switches between a first mode, in whichrolling correction is always carried out as described in the firstexemplary embodiment, and a second mode, in which rolling correction isnot carried out when it is presumed that the effects of distortion dueto the rolling shutter are small as described in the third exemplaryembodiment, may be provided at the digital camera 10. In this case, AFcontrol may be carried out in accordance with the mode that the user hasswitched to by this switching means.

Further, the above-described respective exemplary embodiments describedexamples in which the phase difference detection region is provided at aportion of the imaging region. However, the present invention is notlimited thereto. For example, an imaging element that is usedexclusively for phase difference detection may be provided separatelyfrom the solid-state imaging element that is used in imaging the imagedsubject, and the present invention may be applied also at times ofcarrying out AF control by a phase difference AF method by this imagingelement.

Further, the phase difference detection pixels 1 x, 1 y are not limitedto the example shown in the above-described respective exemplaryembodiments. For example, the phase difference detection pixel 1 x maybe configured such that the right half is shielded from light and theleft half is open, and the phase difference detection pixel 1 y may beconfigured such that the left half is shielded from light and the righthalf is open. In accordance with this as well, in the same way asdescribed above, the light beam that has passed through the one side(left side) with respect to the main axis of the imaging lens isincident on the phase difference detection pixels 1 x, and the lightbeam that has passed through the other side (right side) with respect tothe main axis of the imaging lens is incident on the phase differencedetection pixels 1 y.

Further, the above respective exemplary embodiments describe cases inwhich the phase difference detection pixels that configure the phasedifference detection pixel pair are pixels that are adjacent. However,for example, other pixels may be disposed between the pixels thatconfigure the pair, without them being adjacent to one another.

Note that the above respective exemplary embodiments describe cases inwhich the present invention is applied to a digital camera. However, thepresent invention is not limited thereto. For example, the presentinvention may be made into a form that is applied to other deviceshaving an imaging function, such as cell phones, PDAs and the like. Inthis case as well, effects that are similar to those of theabove-described respective exemplary embodiments may be exhibited.

Moreover, the flows of the processings of the various types ofprocessing programs described in the above exemplary embodiments alsoare examples. It goes without saying that changes to the order ofprocessings of the respective steps, changes to the contents of theprocessings, the deletion of unnecessary steps, the addition of newsteps, and the like may be made within a scope that does not deviatefrom the gist of the present invention.

The disclosure of Japanese Patent Application No. 2011-080033 is, in itsentirety, incorporated by reference into the present Description.

All publications, patent applications, and technical standards mentionedin the present Description are incorporated by reference into thepresent Description to the same extent as if such individualpublication, patent application, or technical standard was specificallyand individually indicated to be incorporated by reference.

What is claimed is:
 1. An imaging device comprising: an imaging elementin which a plurality of first lines, at which are arrayed first phasedifference detection pixels on which is incident a light beam that haspassed through one side with respect to a main axis of an imaging lens,and a plurality of second lines, at which are arrayed second phasedifference detection pixels on which is incident a light beam that haspassed through another side with respect to the main axis of the imaginglens, are arrayed alternately; a reading out section that reads out,from the imaging element and by a rolling shutter method, signals ofphase difference detection pixels that are arrayed at the imagingelement; a first correlation computing section that carries outcorrelation computation on signals that are read out from a set formedfrom the first phase difference detection pixels and the second phasedifference detection pixels, so as to determine phase differenceamounts; a second correlation computing section that carries outcorrelation computation on signals that are read out from at least oneset of a set formed from a plurality of first phase difference detectionpixels that are disposed on the first line, or a set formed from aplurality of second phase difference detection pixels that are disposedon the second line, so as to determine distortion amounts due to therolling shutter; a correcting section that corrects results of acorrelation computation obtained by the first correlation computingsection, by subtracting results of a correlation computation obtained bythe second correlation computing section from the results of thecorrelation computation obtained by the first correlation computingsection; and a focusing section that carries out focus control by usingthe results of correlation computation that have been corrected.
 2. Theimaging device of claim 1, wherein: the second correlation computingsection carries out correlation computation on a plurality of sets, andthe correcting section corrects the results of correlation computationobtained by the first correlation computing section, using an averagevalue of results of correlation computation of a plurality of setsobtained by the second correlation computing section.
 3. The imagingdevice of claim 1, wherein, in a case in which the second correlationcomputing section carries out correlation computation on signals readout from a set that is configured by four or more phase differencedetection pixels, the second correlation computing section divides thefour or more phase difference detection pixels into two groups, andcarries out correlation computation on an addition signal that isobtained by adding detection signals of one group, and an additionsignal that is obtained by adding detection signals of another group. 4.The imaging device of claim 1, further comprising: a comparing sectionthat, in a case in which results of correlation computation of each of aplurality of sets is obtained by the second correlation computingsection, compares the results of correlation computation of each of theplurality of sets with one another; and a control section that, in acase in which results of correlation computation that differ by greaterthan or equal to a predetermined threshold value exist according to thecomparing section, controls such that focus control is cancelled, orcontrols such that, after cancelling of focus control, read out by thereading section is carried out again and focus control is carried out.5. The imaging device of claim 1, wherein the second correlationcomputing section carries out correlation computation on signals thatare read out from a set of phase difference detection pixels at whichare provided color filters of a same color as a color of color filtersthat are provided at phase difference detection pixels of a set formedfrom the first phase difference detection pixel and the second phasedifference detection pixel.
 6. The imaging device of claim 1, whereinthe second correlation computing section carries out correlationcomputation on signals that are read out from a set that includes a setof phase difference detection pixels at which are provided color filtersof a color different than a color of color filters that are provided atphase difference detection pixels of a set formed from the first phasedifference detection pixel and the second phase difference detectionpixel.
 7. The imaging device of claim 1, further comprising: adetermining section that determines whether or not correction by thecorrecting section is to be carried out, on the basis of at least one ofa size of a focal point region in which a focal point is adjusted, anumber of phase difference detection pixels from which are read outsignals that are used in correlation computation by the firstcorrelation computing section, movement of an imaged subject within animaging angle of view, and movement of an imaged subject within thefocal point region, wherein, in a case in which it is determined by thedetermining section that correction by the correcting section is not tobe carried out, the focusing section cancels execution of correction bythe correcting section, and carries out focus control by using resultsof correlation computation of the first correlation computing sectionbefore being corrected.
 8. A focus control method that is carried out atan imaging device having an imaging element in which a plurality offirst lines, at which are arrayed first phase difference detectionpixels on which is incident a light beam that has passed through oneside with respect to a main axis of an imaging lens, and a plurality ofsecond lines, at which are arrayed second phase difference detectionpixels on which is incident a light beam that has passed through anotherside with respect to the main axis of the imaging lens, are arrayedalternately, the method comprising: a reading out step of reading out,from the imaging element and by a rolling shutter method, signals ofphase difference detection pixels that are arrayed at the imagingelement; a first correlation computing step of carrying out correlationcomputation on signals that are read out from a set formed from thefirst phase difference detection pixel and the second phase differencedetection pixel, so as to determine phase difference amounts; a secondcorrelation computing step of carrying out correlation computation onsignals that are read out from at least one set of a set formed from aplurality of first phase difference detection pixels that are disposedon the first line, or a set formed from a plurality of second phasedifference detection pixels that are disposed on the second line, so asto determine distortion amounts due to the rolling shutter; a correctingsection for correcting results of the first correlation computationobtained by the first correlation computing step, by subtracting resultsof correlation computation obtained by the second correlation computingstep from the results of the correlation computation obtained by thefirst computer step; and a focusing step of carrying out focus controlby using the results of correlation computation that have beencorrected.